﻿namespace TfsCloudDeploy.Workflow.Tests.Mocks
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Microsoft.TeamFoundation.Build.Client;

    internal class BuildController : IBuildController
    {
        public void AddBuildAgent(IBuildAgent agent)
        {
        }

        public System.Collections.ObjectModel.ReadOnlyCollection<IBuildAgent> Agents
        {
            get { return null; }
        }

        public string CustomAssemblyPath
        {
            get
            {
                return string.Empty;
            }
            set
            {
            }
        }

        public DateTime DateCreated
        {
            get { return DateTime.Now; }
        }

        public DateTime DateUpdated
        {
            get { return DateTime.Now; }
        }

        public void Delete()
        {
        }

        public string Description
        {
            get
            {
                return string.Empty;
            }
            set
            {
            }
        }

        public bool Enabled
        {
            get
            {
                return true;
            }
            set
            {
            }
        }

        public List<System.Reflection.Assembly> LoadCustomActivities(string localPath, Microsoft.TeamFoundation.VersionControl.Client.RecursionType recursionType, HostEnvironmentOption environmentOptions, out List<Type> activityTypes, out List<IFailure> failures)
        {
            activityTypes = null;
            failures = null;
            return null;
        }

        public List<System.Reflection.Assembly> LoadCustomActivitiesAndExtensions(string localPath, Microsoft.TeamFoundation.VersionControl.Client.RecursionType recursionType, HostEnvironmentOption environmentOptions, out List<Type> activityTypes, out List<Type> extensionTypes, out List<IFailure> failures)
        {
            activityTypes = null; 
            extensionTypes = null;
            failures = null;
            return null;
        }

        public int MaxConcurrentBuilds
        {
            get
            {
                return 1;
            }
            set
            {
            }
        }

        public string Name
        {
            get
            {
                return "TestController";
            }
            set
            {
            }
        }

        public int QueueCount
        {
            get { return 0; }
        }

        public void Refresh(bool refreshAgentList)
        {
        }

        public void RemoveBuildAgent(IBuildAgent agent)
        {
        }

        public void Save()
        {
        }

        public IBuildServiceHost ServiceHost
        {
            get { return null; }
        }

        public ControllerStatus Status
        {
            get
            {
                return ControllerStatus.Available;
            }
            set
            {
            }
        }

        public string StatusMessage
        {
            get
            {
                return string.Empty;
            }
            set
            {
            }
        }

        public System.Collections.ObjectModel.ReadOnlyCollection<string> Tags
        {
            get { return null; }
        }

        public Uri Uri
        {
            get { return new Uri("vstfs:///Build/Controller/1"); }
        }

        public Uri Url
        {
            get { return new Uri("vstfs:///Build/Controller/260"); }
        }
    }
}
